/**
 * @param {character[][]} board
 * @param {string} word
 * @return {boolean}
 */
 var exist = function(board, word) {
  let startRow=0,startCol=0,index=0,m =board.length,n=board[0].length
  let visited =  Array.from(Array(m).fill(0),() => Array(n).fill(0))
  dfs(startCol,startRow)
 
  function dfs(row,col){
    if(row)
    if(board[row][col]==word[index]){
      visited[startRow][startCol]=1
      index++
      
    }
  }
};